Handle float and uint style properties
authorMatthias Clasen <mclasen@redhat.com>
Wed, 17 Nov 2010 05:21:21 +0000 (00:21 -0500)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:39:15 +0000 (15:39 +0100)
These were giving errors in testgtk.

gtk/gtkcssprovider.c

index f9ae56df4fc04129e6d355d5bff3e0a133a7f5b7..7af82911ca391bb0a8a5f37f3f9da8fdc22a303a 100644 (file)
@@ -2467,8 +2467,12 @@ css_provider_parse_value (GtkCssProvider *css_provider,
     }
   else if (type == G_TYPE_INT)
     g_value_set_int (value, atoi (value_str));
+  else if (type == G_TYPE_UINT)
+    g_value_set_uint (value, (guint) atoi (value_str));
   else if (type == G_TYPE_DOUBLE)
     g_value_set_double (value, g_ascii_strtod (value_str, NULL));
+  else if (type == G_TYPE_FLOAT)
+    g_value_set_float (value, (gfloat) g_ascii_strtod (value_str, NULL));
   else if (type == GTK_TYPE_THEMING_ENGINE)
     {
       GtkThemingEngine *engine;